-- GENERATED SPELL FOR [Qiraji Warrior] --


function spell0_15387(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_15387', 603, 1)
end

function spell1_15387(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15588,pUnit)
pUnit:RegisterEvent('Sorts_15387', 10298, 1)
end

function spell2_15387(pUnit, Event) --@Uppercut,n/a--
pUnit:FullCastSpellOnTarget(10966,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15387', 643, 1)
end

function Sorts_15387(pUnit, Event)
local choix_sorts_15387 = math.random(0, 2)
if choix_sorts_15387 == 0 then
pUnit:RegisterEvent('spell0_15387', 1, 1)
end
if choix_sorts_15387 == 1 then
pUnit:RegisterEvent('spell1_15387', 1, 1)
end
if choix_sorts_15387 == 2 then
pUnit:RegisterEvent('spell2_15387', 1, 1)
end
end

function mob15387_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15387', math.random(1500, 3000), 1)
end

function mob15387_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15387_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15387_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15387, 1, 'mob15387_Action')
RegisterUnitEvent(15387, 2, 'mob15387_Leave')
RegisterUnitEvent(15387, 3, 'mob15387_Kill')
RegisterUnitEvent(15387, 4, 'mob15387_Die')
